<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditImprezaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditImprezaLabel_id}" for="id" />
                    <h:inputText id="id" value="#{imprezaController.selected.id}" title="#{bundle.EditImprezaTitle_id}" required="true" requiredMessage="#{bundle.EditImprezaRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditImprezaLabel_miasto}" for="miasto" />
                    <h:inputText id="miasto" value="#{imprezaController.selected.miasto}" title="#{bundle.EditImprezaTitle_miasto}" required="true" requiredMessage="#{bundle.EditImprezaRequiredMessage_miasto}"/>
                    <h:outputLabel value="#{bundle.EditImprezaLabel_dataimprezy}" for="dataimprezy" />
                    <h:inputText id="dataimprezy" value="#{imprezaController.selected.dataimprezy}" title="#{bundle.EditImprezaTitle_dataimprezy}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditImprezaLabel_opis}" for="opis" />
                    <h:inputText id="opis" value="#{imprezaController.selected.opis}" title="#{bundle.EditImprezaTitle_opis}" required="true" requiredMessage="#{bundle.EditImprezaRequiredMessage_opis}"/>
                    <h:outputLabel value="#{bundle.EditImprezaLabel_organizator}" for="organizator" />
                    <h:inputText id="organizator" value="#{imprezaController.selected.organizator}" title="#{bundle.EditImprezaTitle_organizator}" />
                    <h:outputLabel value="#{bundle.EditImprezaLabel_nazwa}" for="nazwa" />
                    <h:inputText id="nazwa" value="#{imprezaController.selected.nazwa}" title="#{bundle.EditImprezaTitle_nazwa}" required="true" requiredMessage="#{bundle.EditImprezaRequiredMessage_nazwa}"/>
                </h:panelGrid>
                <h:commandLink action="#{imprezaController.update}" value="#{bundle.EditImprezaSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditImprezaViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{imprezaController.prepareList}" value="#{bundle.EditImprezaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditImprezaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
